home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
disktime.zip
/
DISKTIME.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-11-03
|
2KB
|
82 lines
Program DiskTime;
{
This program measures the time taken to execute seeks to random
places on the IBM-PC & compatible hard disk. It is completely
safe, and will not alter the data on your hard disk in any way.
Restrictions:
This program uses INT 13h to communicate with the IBM-PC/XT and
IBM-PC/AT hard disk. If you have problems on a compatible then
it is not as compatible as you thought...
Notice:
A limited licence is granted to all users of this program
to make copies and distribute them provided that
o This notice is not removed
o The program is not distirbuted in modified form
o No fee is charged for copying or distributing
Modifications:
Who When What
--- ---- ----
Y.N. Miles 31-Oct-85 Original in Turbo Pascal 3.0
Y.N. Miles 01-Nov-85 Use Turbo's RANDOM(Max) Function
Add documentation in comments
Y.N. Miles 02-Nov-85 New procedure to print banner
New procedure to recalibrate drive
Rename variable MaxCyl to CylMax
in procedure MaxCyl
}
Const
Thismany:Integer=1000;
Var
Cylinder:Integer;
CylMax:Integer;
Drive:Integer;
Seeks:Integer;
Start:Real;
Elapsed:Real;
{$IBANNER.PAS}
{$IASK.PAS}
{$IMAXCYL.PAS}
{$IRECAL.PAS}
{$ISEEK.PAS}
{$ISECNDS.PAS}
{$IRESULTS.PAS}
Begin
Banner;
Ask(Drive);
Maxcyl(Drive,CylMax);
Recalibrate(Drive,CylMax);
Write('Testing ');
NormVideo;
Write(ThisMany);
LowVideo;
Write(' cylinders or until ');
NormVideo;
Write('any key');
LowVideo;
Writeln(' is pressed...');
Seeks:=0;
Start:=Secnds;
While (KeyPressed xor (Seeks<>ThisMany)) do
Begin
Cylinder:=Random(CylMax);
Seek(Drive,Cylinder);
Seeks:=Seeks+1;
End;
Elapsed:=Secnds-Start;
Results(Elapsed,Seeks);
End.